Upper case the console messages and stamp the banner (#98) - #99
Conversation
The operator console output was mixed case, named a version hardcoded in
ftpd.h, and reused message IDs for unrelated events. All three are now
aligned with UFSD.
Build stamp. Bump the mbt submodule to mbt#64 so .mbt/buildstamp.h is
generated, and use it for the banner:
FTPD000I FTPD 1.0.0-DEV (CF14987) STARTING
FTPD005I LIBC370 1.0.2-DEV (5C0DEEB)
FTPD006W BUILT FROM A MODIFIED WORKING TREE
...
FTPD001I FTPD 1.0.0-DEV READY
A deploy/relink mismatch -- sysroot says X, the STC runs Y -- can no
longer hide, and a build carrying uncommitted tracked changes says so
instead of passing itself off as the commit it was branched from.
buildstamp.h is included per translation unit (ftpd.c, ftpd#con.c,
ftpd#cmd.c) and deliberately not from ftpd.h: -MMD would otherwise make
a new commit rebuild every object. FTPD_VERSION and FTPD_VERSION_STR
are gone; FTPD_PRODUCT holds the name the STAT reply still needs.
Case. Every ftpd_log_wto() message is upper case; values -- data set
names, VOLSERs, the banner, every %s/%d substitution -- keep their
original case. ftpd_upcase() (ftpd#log.c) handles the three strings
that arrive lower case at runtime: MBT_VERSION, MBT_COMMIT and
libc370_version(). It uses the libc370 toupper(), so the mapping is
EBCDIC-correct.
ftpd_session_reply() is untouched: those are FTP protocol replies read
by clients, not console output. So is ftpd_log(), which goes to SYSOUT.
Message IDs. Six were ambiguous or in the wrong slot:
FTPD097I shutting down -> FTPD098I
FTPD098I shutdown complete -> FTPD099I
FTPD099E COM area not available -> FTPD090E (was sharing 099E)
FTPD099E initialization failed -> FTPD091E (was sharing 099E)
FTPD090E unknown command / TRACE -> FTPD021E (UFSD's 020I/021E pair)
FTPD005W SSLPROXY (x2) -> FTPD007W (005 is libc370 now)
The two APF success messages are gone -- UFSD reports only the failure,
and one of them was a second FTPD000I competing with the banner. The
warn-and-continue behaviour on APF failure (FTPD003W) is unchanged.
/F FTPD,VERSION now repeats the banner identity instead of a static
string, which is what an operator asking it after a deploy wants.
MCS prefixes every message from an unauthorized problem program with
'+'. clib_apf_setup() ran inside initialize(), i.e. after the banner
had already gone out, so the startup showed one line marked up
differently from all the others:
+FTPD000I FTPD Server 1.0.0-dev starting
FTPD000I FTPD was APF authorized via SVC 244
Hoist the call into main() between __cibset() and the banner, which is
where UFSD has it. The rc is carried past the banner rather than
reported at the call site: a failure is worth a line, but not one ahead
of the message saying which server is starting. FTPD still warns and
continues where UFSD gives up -- that behaviour is unchanged.
initialize() no longer needs argc/argv and drops both parameters.
|
Follow-up in db28e70: the banner also had a MCS prefixes every message from an unauthorized problem program with The SOLL has no
Also ran the test suites, since the mbt bump carries two test-infrastructure |
Closes #98.
Before / after
Plus, only when the module was built from a tree with uncommitted tracked
changes (mirrors
UFSD006W):What changed
Build stamp.
mbtbumpedbf0e081->8b8a2f0(mbt#64, fast-forward) so.mbt/buildstamp.his generated. The banner now carriesMBT_VERSION,MBT_COMMITandlibc370_version(), so a deploy/relink mismatch cannot hide.buildstamp.his included per translation unit (ftpd.c,ftpd#con.c,ftpd#cmd.c) and deliberately not fromftpd.h---MMDwould otherwise makea new commit rebuild every object.
FTPD_VERSION/FTPD_VERSION_STRare gone;FTPD_PRODUCTholds the name the STAT reply still needs.Case. Every
ftpd_log_wto()message is upper case; values (data set names,VOLSERs, the banner text, every
%s/%d) keep their original case.ftpd_upcase()inftpd#log.chandles the three strings that arrive lower caseat runtime -- it uses the libc370
toupper(), so the mapping is EBCDIC-correct.Message IDs.
FTPD097Ishutting downFTPD098IFTPD098Ishutdown completeFTPD099IFTPD099ECOM area not availableFTPD090EUFSD090E; was sharing 099EFTPD099Einitialization failedFTPD091EFTPD090Eunknown command / TRACE syntaxFTPD021EFTPD005WSSLPROXY (x2)FTPD007WThe two APF success messages are gone -- UFSD reports only the failure, and one
of them was a second
FTPD000Icompeting with the banner. The warn-and-continuebehaviour on APF failure (
FTPD003W) is unchanged./F FTPD,VERSIONnow repeats the banner identity (version, commit, libc370)instead of a static string.
Out of scope
ftpd_session_reply()was not touched -- those are FTP protocol replies read byclients, not console output -- nor
ftpd_log(), which goes to SYSOUT.Verification
makeunder-Wall -Werror, no warnings.FTPDnnnXliteral:all upper case, no duplicate IDs,
LIBC370 1.0.2-dev (5c0deeb)linked in.#if MBT_COMMIT_DIRTYchecked both ways:FTPD006Wis in the module whilethe tree carries the uncommitted submodule bump, and compiled out after the
commit (
MBT_COMMIT "ca2b42d",MBT_COMMIT_DIRTY 0).doc/FTPD_RAKF_SETUP.mdupdated for theFTPD004I/FTPD004Wwording.The console output itself is unverified until the STC is restarted on the
target -- the checks above are on the built module, not a running server.